import service from '../until/request';
import qs from 'qs';
//用户登录
export function user_login(paylod){
    return service.post('/zxqyfw/web/qyUser/login',qs.stringify({...paylod}),)
   }
   //用户注册
   export function user_add(paylod){
    return service.post('/zxqyfw/web/qyUser/add-new',qs.stringify({...paylod}),)
   }
   
   //忘记密码
   export function user_reset(paylod){
    return service.post('/zxqyfw/web/qyUser/updatePassword',qs.stringify({...paylod}),)
   }
    //发送验证码
    export function user_send(paylod){
        return service.post('/zxqyfw/web/qyUser/send',qs.stringify({...paylod}),)
       }
     //查看申报数
     export function countStatus(paylod){
      return service.post('/zxqyfw/web/applicationReview/countStatus',qs.stringify({...paylod}),)
     }
  //文件预览
  export function upload_file(paylod){
    return service.get('/zxqyfw/pub/fileUploadRecord/preview'+'?'+qs.stringify(paylod),{ responseType: 'blob'})
   }
    //文件下载
  export function download(paylod){
    return service.get('/zxqyfw/pub/fileUploadRecord/download'+'?'+qs.stringify(paylod),{ responseType: 'blob'})
   }
//企业认证
export function qy_renzheng(paylod={}){
  return service.post('/zxqyfw/web/qyUser/certificationDetails',qs.stringify({...paylod}))
 }
 //查看用户认证状态
export function user_renzheng(paylod={}){
  return service.post('/zxqyfw/web/qyUser/certificationStatus',qs.stringify({...paylod}))
 }
 //邮箱状态已读
export function user_read(paylod={}){
  return service.post('/zxqyfw/web/qyUser/setCertificationStatus',qs.stringify({...paylod}))
 }
 //申报通过消息提示
 export function pingtai_Count(paylod={}){
  return service.post('/zxqyfw/web/applicationReview/getStatusByUserId',qs.stringify({...paylod}))
 }

  //申报已读消息
  export function pingtai_read(paylod={}){
    return service.post('/zxqyfw/web/applicationReview/setStatusByUserId',qs.stringify({...paylod}))
   }
  
 //门户公告公示
 export function gonggao_list(paylod){
  return service.get('/zxqyfw/web/publicAnnouncement/getListByType'+'?'+qs.stringify(paylod))
 }
 //公告公示详情
 export function gonggao_detail(paylod){
  return service.get('/zxqyfw/web/publicAnnouncement/getOne'+'?'+qs.stringify(paylod))
 }
 //公告公示详情图片
 export function gonggao_detailjpg(paylod){
  return service.get('/zxqyfw/web/publicAnnouncement/getView'+'?'+qs.stringify(paylod))
 }
  //查询所有留言
  export function message_list(paylod){
    return service.get('/zxqyfw/web/messageDetails/getList'+'?'+qs.stringify(paylod))
   }
    //咨询发送短信
  export function message_send(paylod){
    return service.get('/zxqyfw/pub/messageCode/getCode'+'?'+qs.stringify(paylod))
   }
     //门户 分页公告总数total
  export function message_total(paylod){
    return service.get('/zxqyfw/web/messageDetails/getTotal'+'?'+qs.stringify(paylod))
   }
   //投诉留言数量
  export function message_tousuCount(paylod){
    return service.get('/zxqyfw/web/publishMessage/countComplaintQt'+'?'+qs.stringify(paylod))
   }
   //咨询留言数量
  export function message_zixunCount(paylod){
    return service.get('/zxqyfw/web/publishMessage/countPublishMessageQt'+qs.stringify(paylod))
   }
   //意见留言数量
  export function message_yijianCount(paylod){
    return service.get('/zxqyfw/web/publishMessage/countOpinionQt'+'?'+qs.stringify(paylod))
   }
   //新增一条咨询
   export function message_add(paylod={}){
    return service.post('/zxqyfw/web/messageDetails/addOne',paylod)
   }
   //查看留言标题
   export function message_title(paylod){
    return service.get('/zxqyfw/web/publishMessage/getBoxMessage'+'?'+qs.stringify(paylod))
   }
     //查看留言回复
  export function message_detail(paylod){
    return service.get('/zxqyfw/web/replyMessage/getOneReply'+'?'+qs.stringify(paylod))
   }
   
   //示范平台申报
   export function shifan_add(paylod){
    return service.post('/zxqyfw/web/applicationReview/addNew',paylod)
   }
   //示范基地申报
   export function shifan_add1(paylod){
    return service.post('/zxqyfw/web/applicationReview/addNew1',paylod)
   }
   //示范机构申报
   export function shifan_add2(paylod){
    return service.post('/zxqyfw/web/applicationReview/addNew2',paylod)
   }
   //年审消息已读
   export function nianshen_read(paylod={}){
    return service.post('/zxqyfw/web/annualExamination/getStatusByUserId',qs.stringify({...paylod}))
   }
   //年审消息修改已读
   export function nianshen_setread(paylod={}){
    return service.post('/zxqyfw/web/annualExamination/setStatusByUserId',qs.stringify({...paylod}))
   }
   //根据用户id跳转个人中心
   export function user_tiaozhuan(paylod={}){
    return service.post('/zxqyfw/web/applicationReview/countDeclaration',qs.stringify({...paylod}))
   }
   //申报企业名称
   export function shenbao_qyname(paylod){
    return service.get('/zxqyfw/web/applicationReview/getList'+'?'+qs.stringify({...paylod}))
   }
   //新增模板
   export function moban_add(paylod={}){
    return service.post('/zxqyfw/pub/template/addNew',paylod)
   }
   //查询模板
   export function moban_list(paylod={}){
    return service.post('/zxqyfw/pub/template/selectTemplate',qs.stringify({...paylod}))
   }
   //新增融资需求
   export function rongzi_add(paylod){
    return service.post('/zxqyfw/web/financialDetails/addOne',qs.stringify({...paylod}))
   }
  
   //获取所有融资
   export function rongzi_list(paylod){
    return service.get('/zxqyfw/web/financialDetails/getList'+'?'+qs.stringify(paylod))
   }
  
//-------------------------------------------------------------------------------------

   //根据id查询用户认证详情
   export function renzheng_detail(paylod){
    return service.post('/zxqyfw/web/qyUser/selectDetails',qs.stringify({...paylod}))
   } 
   //修改用户认证详情
   export function renzheng_reset(paylod){
    return service.post('/zxqyfw/web/qyUser/UpdateCertificationDetails',qs.stringify({...paylod}))
   } 
    //个人中心渲染示范平台
    export function shifan_detail(paylod){
      return service.post('/zxqyfw/web/applicationReview/getDeclarationByUserId',qs.stringify({...paylod}))
     } 
     //根据文件id渲染文件名
     export function getFileName(paylod){
      return service.get('/zxqyfw/pub/fileUploadRecord/getFileName'+'?'+qs.stringify(paylod))
     }

     //修改示范平台
     export function shifan_reset(paylod){
      return service.post('/zxqyfw/web/applicationReview/updateAddNew0',paylod)
     } 
      //修改示范基地
      export function jidi_reset(paylod){
        return service.post('/zxqyfw/web/applicationReview/updateAddNew1',paylod)
       } 
        //修改入驻机构
     export function jigou_reset(paylod){
      return service.post('/zxqyfw/web/applicationReview/updateAddNew2',paylod)
     } 
     //撤销申报
     export function repeal(paylod){
      return service.post('/zxqyfw/web/applicationReview/updateRevocationByIds',qs.stringify({...paylod}))
     } 
     //新增示范平台年审
     export function nianshen_add0(paylod){
      return service.post('/zxqyfw/web/annualExamination/addOne0',paylod)
     } 
     //新增示范基地年审
     export function nianshen_add1(paylod){
      return service.post('/zxqyfw/web/annualExamination/addOne1',paylod)
     } 
     //新增年审
     export function nianshen_add2(paylod){
      return service.post('/zxqyfw/web/annualExamination/addOne2',paylod)
     } 
  //删除认证营业执照
  export function deletefileId(paylod){
    return service.get('/zxqyfw/pub/fileUploadRecord/delFile'+'?'+qs.stringify(paylod))
   }
 //查询申报列表
 export function shenbao_list(paylod){
  return service.get('/zxqyfw/web/applicationReview/getApplicationReviewByUserId'+'?'+qs.stringify(paylod))
 }
  //查询年审详情
  export function nianshen_detailList(paylod){
    return service.post('/zxqyfw/web/annualExamination/getAnnualExaminationInformation',qs.stringify(paylod))
   } 
 
  //新增年审
  export function nianshen_detail(paylod){
    return service.post('/zxqyfw/web/annualExamination/selectAnnualExamination',qs.stringify(paylod))
   } 
   //获取融资企业数和融资金额
   export function rongzi_count(paylod){
    return service.post('/zxqyfw/web/financialDetails/getTotalAndMoney',qs.stringify(paylod))
   } 
   //
   //是否显示融资列表
   export function rongzi_state(paylod){
    return service.post('/zxqyfw/web/financialDetails/getFinancialDetailsStatus',qs.stringify(paylod))
   } 
   //修改平台年审
   export function nianshen_reset0(paylod){
    return service.post('/zxqyfw/web/annualExamination/updateFiles0',paylod)
   } 
   //修改基地年审
   export function nianshen_reset1(paylod){
    return service.post('/zxqyfw/web/annualExamination/updateFiles1',paylod)
   } 
   //修改机构年审
   export function nianshen_reset2(paylod){
    return service.post('/zxqyfw/web/annualExamination/updateFiles2',paylod)
   } 
     //根据主表ID查看详情
     export function zhubiao_detail(paylod){
      return service.post('/zxqyfw/web/applicationReview/getDeclarationInformation',qs.stringify(paylod))
     } 
  //查看全部留言
  // export function allrecords(data){
  //   return service({
  //     url:'/zxqyfw/web/publishMessage/getList',
  //     method:'get',
  //     params:data
  //   })
  // }
  export function allrecords(paylod){
    return service.get('/zxqyfw/web/messageDetails/getList'+'?'+qs.stringify(paylod))
   }